package com.biz.primus.model.coupon.vo.couponType;

import com.biz.primus.base.exception.utils.AssertUtils;
import com.biz.primus.model.coupon.exceptions.CouponTypeExceptionType;
import com.biz.primus.model.coupon.interfaces.IModelValidation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Objects;
import lombok.Getter;
import lombok.Setter;

/**
 * 追加优惠券发行数量VO
 *
 * @author david-liu
 */
@ApiModel(value = "优惠券追加发行Vo")
@Getter
@Setter
public class AppendCouponTypeIssuedCountVo implements Serializable, IModelValidation {
    private static final long serialVersionUID = 3270513050331869068L;

    @ApiModelProperty(value = "优惠券类型ID")
    private Long couponTypeId;

    @ApiModelProperty(value = "追加发行数量")
    private Integer appendingIssuedCount;

    @Override
    public void validate() {
        AssertUtils.isTrue(Objects.nonNull(couponTypeId) && Objects.nonNull(appendingIssuedCount), CouponTypeExceptionType.PARAMETER_ILLEGAL, new Object[]{"优惠券类型ID和追加发行数量不能为空"});
    }
}
